fn create_box(val: i32) {
    let _box1 = Box::new(val);
}

struct ToDrop;

impl Drop for ToDrop {
    fn drop(&mut self) {
        println!("ToDrop is being dropped");
        // drop(self);
    }
}

fn main() {
    println!("Hello, world!");
    let _box2 = Box::new(5i32);
    {
        let _box3 = Box::new(5i32);
    }
    for num in 0i32..1000 {
        create_box(num);
    }

    let x = ToDrop;
    println!("-------------");
}
